Skip to main content

Pinewood

Introduction

This document describes the integration of Pinewood DMS with the platform.

Configuration at service Unit Level

Example

"liveDiaryProvider": {
"supplierMappingId": "204a7239-a88f-4d67-bc74-08919e1bfe8c",
"provider": "PINEWOOD"
}

supplierMappingId will change depending on the supplier, this will be provided by pinewood

Mappings

This section documents all the mapping constants used for PINEWOOD DMS integration. These mappings translate between internal service types and Pinewood DMS-specific identifiers.

1. Service Type to Work Hours Mapping

Maps internal service types to work hours (duration) used in Pinewood DMS API requests.

Service TypeWork Hours
SERVICE1
REPAIR1
MOT1
GLASS1
TYRE1

2. Optional Services Mapping

Maps internal optional service types to Pinewood DMS Booking Resource UIDs. These are used to specify additional services or booking resources required for an appointment.

Optional Service TypePinewood UID
COLLECTION_AND_DELIVERYA6F756D3-2CF5-4B71-B28E-4CDAEF37F8EA
COURTESY_CAR3C527CD6-CBA8-4429-ABCB-70788A4D686B
WHILE_YOU_WAIT5434497C-BAED-4BF6-AD3A-079DEE69CF05
DROP_OFF2D8570A9-F630-438D-9ABC-E7C66C0291BA

Important Notes:

  • DROP_OFF is mandatory for all bookings and is always included in the booking resources
  • Additional optional services can be added alongside DROP_OFF

3. Odometer Type Mapping

Maps odometer measurement types to numeric values used in Pinewood DMS vehicle creation.

Odometer TypeValue
MILES0
KILOMETERS1
HOURS2

4. Service Type to Operation Type Mapping

Maps internal service types to Pinewood DMS Operation Type UIDs. These identify the type of work operation to be performed.

Service TypeOperation Type UIDPinewood Operation Type
SERVICE2A6B24E7-CE9F-4641-99FB-24AAFB7069D3SERVICE
MOT9623085B-4ABE-48CF-AF96-414B45A10B10MOT
REPAIRB756E911-B1EC-4312-AC3F-D10C39EC8709OTHER
GLASSB756E911-B1EC-4312-AC3F-D10C39EC8709OTHER
TYREB756E911-B1EC-4312-AC3F-D10C39EC8709OTHER

Authentication

Pinewood DMS uses Basic Authentication with username and password credentials. The credentials are stored securely in Google Secret Manager under the key PINEWOOD_CLIENT_CREDENTIALS.

Important: All requests to Pinewood go through a proxy function which has a static IP address.

Fetching Available Slot Dates

When a user selects a supplier with Pinewood DMS integration, the system fetches available slot dates from Pinewood. These dates are formatted based on different optional services and displayed in the UI with red/green indicators showing slot availability.

Steps:

  1. User selects a supplier with Pinewood DMS integration
  2. UI requests available slot dates from Callables
  3. Callables fetches available dates from Pinewood DMS
  4. Dates are formatted based on optional services and returned to UI
  5. User selects an optional service, and the UI updates date availability indicators (red/green)

Fetching Time Slots

When the user selects a date, the system fetches available time slots for that date and the selected optional service.

Steps:

  1. User selects a date from the available dates
  2. UI sends request to Callables with selected date and optional service
  3. Callables requests time slots from Pinewood DMS
  4. Available time slots are formatted and returned to UI
  5. User sees available time slots displayed for the selected date

Creating an Appointment

Before creating a booking in Pinewood DMS, the system searches for the customer and vehicle. If not found, they are created automatically:

  • Customer: Created with driver information if not found
  • Vehicle: Created with vehicle information from ViSN and linked to the customer

The booking may be created as a normal booking or as a lead. After successful booking creation in Pinewood, an enquiry is created in ViSN. If the enquiry creation fails, the booking is automatically cancelled in Pinewood to maintain consistency.

Steps:

  1. User selects a time slot and fills required details, then clicks "Submit"
  2. Callables searches for customer in Pinewood DMS; creates if not found
  3. Callables searches for vehicle in Pinewood DMS; creates and links to customer if not found
  4. Booking is created in Pinewood DMS (may be created as normal booking or lead)
  5. Enquiry is created in ViSN
  6. If enquiry creation fails, the booking is automatically cancelled in Pinewood DMS
  7. User receives success or error message in UI

Cancelling an Appointment

Cancellation Scenarios

Cancellation of a booking in Pinewood DMS can occur in the following scenarios:

  1. Technical Failure After DMS Booking:

    • When a booking is created successfully in DMS, but the subsequent enquiry creation in ViSN fails due to a technical issue, the system automatically cancels the booking in DMS to maintain consistency.
  2. User-Initiated Cancellation in ViSN:

    • When a customer user cancels the booking from the ViSN platform for any reason, the system sends a cancellation request to Pinewood DMS to remove the booking.
  3. Rearranging a Booking Date:

    • When a customer user wants to rearrange (reschedule) the booking date, the original booking in DMS is cancelled, and a new booking is created in ViSN with the updated date.

Cancellation Process

During cancellation, the system checks the booking type:

  • Normal booking: Directly cancelled
  • Lead booking: System checks if the lead was converted to a normal booking
    • If converted: Normal booking is cancelled
    • If not converted: Lead booking is cancelled

Steps:

  1. User requests to cancel a booking from ViSN platform
  2. Callables checks the booking type (normal booking or lead)
  3. Normal booking: Directly cancelled in Pinewood DMS
  4. Lead booking:
    • System checks if lead was converted to normal booking
    • Cancels the appropriate booking type (normal or lead)
  5. Cancellation confirmation is returned to UI
  6. User sees cancellation confirmation message

References

Status: Accepted
Category: Protected
Authored By: Gladson on Nov 06, 2025
Revisions